package com.situ.mall.common.service.impl;

import com.github.pagehelper.PageHelper;
import com.situ.mall.common.entity.Member;
import com.situ.mall.common.entity.OrderAddress;
import com.situ.mall.common.mapper.OrderAddressMapper;
import com.situ.mall.common.service.IOrderAddressService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.situ.mall.common.util.RequestUtil;
import com.situ.mall.common.vo.PayVO;
import com.situ.mall.common.vo.TableVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 闫佳宁
 * @since 2023-09-22
 */
@Service
public class OrderAddressServiceImpl extends ServiceImpl<OrderAddressMapper, OrderAddress> implements IOrderAddressService {
@Autowired
private OrderAddressMapper orderAddressMapper;
    @Override
    public TableVO select(String status, Integer limit, Integer page, String keyword) {
        TableVO vo=new TableVO();
        Member m=(Member) RequestUtil.getCurrent();
        PageHelper.startPage(page,limit);
        List<PayVO> list=orderAddressMapper.select2(status,keyword,m.getId());
        return vo.data(list);
    }

}
